package org.dromara.travel.domain.bo;

import org.dromara.travel.domain.UserEvent;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 用户参与活动业务对象 user_event
 *
 * @author jacheut
 * @date 2024-04-04
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = UserEvent.class, reverseConvertGenerate = false)
public class UserEventBo extends BaseEntity {

    /**
     * 用户参与活动记录ID，自增主键
     */
    @NotNull(message = "用户参与活动记录ID，自增主键不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 参与活动的用户ID，参考users表中的id
     */
    @NotNull(message = "参与活动的用户ID，参考users表中的id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long userId;

    /**
     * 参与的活动ID，参考events表中的id
     */
    @NotNull(message = "参与的活动ID，参考events表中的id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long eventId;

    /**
     * 用户加入活动的时间，自动填充当前时间
     */
    @NotNull(message = "用户加入活动的时间，自动填充当前时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date joinTime;

    /**
     * 是否审批，0:未审批，1:审批通过，2:审批拒绝
     */
    @NotNull(message = "是否审批，0:未审批，1:审批通过，2:审批拒绝不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long approveStatus;

    /**
     * 审批描述
     */
    @NotBlank(message = "审批描述不能为空", groups = { AddGroup.class, EditGroup.class })
    private String approveMsg;

    /**
     * 用户参与状态, 0:Joined 1:Canceled 2:Completed
     */
    @NotNull(message = "用户参与状态, 0:Joined 1:Canceled 2:Completed不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long status;


}
